#ifndef __RED_MODULE_OBJECT_H__
#define __RED_MODULE_OBJECT_H__

#include "eval.h"
#include "redobject.h"

typedef struct _RedModuleObject
{
	RedObject_HEAD
} RedModuleObject;

typedef char (* RedModuleEntry)(RedObject *self, RedObject *name);

RED_EXPORT extern RedTypeObject RedType_Module;

#define RedModule_Exact(o)		((o)->ob_type == &RedType_Module)

RED_EXPORT RedObject *RedModule_Eval(RedObject *code);
RED_EXPORT RedObject *RedModule_Import(const char *fname, RedObject *consts);
RED_EXPORT RedObject *RedModule_Compile(const char *fname, RedObject *name, RedObject *script, RedObject *consts);

#endif /* __RED_MODULE_OBJECT_H__ */
